const Controller=require('egg').Controller
const axios=require('axios')
class ProductControll extends Controller{   
    async products(){
        const { ctx } = this;
        const query = ctx.request.query;
        console.log(query);
        const productData = await ctx.service.product.list(query);
        ctx.body = {
          code: 1,
          data: productData,
        }
  }
  async classify() {
    const { ctx } = this;
    const classifyData = await ctx.service.product.classify();
    ctx.body = {
      code: 1,
      data: classifyData,
    };
  }
  async searchSuggestions(){
      const data=axios({
          url:'',
          method:'POTS',
          headers:{

          },
          data:{
            
          }
      })
      console.log(data.data)
      this.ctx.body=data.data
  }

}
module.exports=ProductControll